<extend name="Public/base" />
<block name="body">
<style type="text/css">
.ac{
  margin: 20px;
  font-size: 18px;
}
.account_name{
  color: red;
}
.integral{
  color: red;
}
.doubi{
  color: red;
}
.ac-btn .btn-success{
  font-size: 18px;
  padding: 10px 20px;
}
</style>

		<!-- 数据列表 -->
		<div class="wrap">
	<ul class="tab-nav nav">
		<li class="current" data-type="account-info">
			<a href="javascript:void(0);">基本信息
			</a>
		</li>
		<li data-type="account-records" class="hidden">
			<a href="javascript:void(0);">交易记录
			</a>
		</li>
	</ul>

    <section id="account-info" class="tab-content">

            <div class="ac">
                <span class="">账户名称:&nbsp;&nbsp;</span>
                <span class="account_name"></span>
            </div>
            <div class="ac">
                <span class="">积分:&nbsp;&nbsp;</span>
                <span class="integral"></span>
            </div>
            <div class="ac">
                <span class="">余额:&nbsp;&nbsp;</span>
                <span class="doubi"></span>
            </div>

            <div class="ac-btn">
                <span class=""><a href="http://douchat.cc/?/account/recharge/" target="_blank" class="btn btn-success">账户充值</a></span>
            </div>    

    </section>

    <section id="account-records" class="tab-content hidden">
        <div class="data-table table-striped">
          <table>
            <thead>
              <tr>
                <th class="">名称</th>
                <th class="">时间</th>
              </tr>
            </thead>
            <tbody>
            </tbody>
          </table>
        </div>
    </section>
  </div>
	</div>
	<script type="text/javascript" src="__JS__/yunservice_api.js"></script>
	<script>
	function show_user_account(data) {
       if (data.errcode != 1111) {
          alert(data.errmsg);
          window.location.href = "{:U('siteinfo')}";
       }
			 $(".account_name").html(data.data.user_name);
       $(".integral").html(data.data.integral);
       $(".doubi").html(data.data.doubi);
	}
	var params = {uid:"{$site_info.admin_uid}",site_url:"{$site_info.site_url}",site_token:"{$site_info.site_token}"};
	
	get_api_data('user_account','show_user_account', params);

  $('.tab-nav').on('click', 'li', function() {
    _this = $(this);
    $('.tab-content').hide();
    $('#'+_this.data('type')).removeClass('hidden');
    $('#'+_this.data('type')).show();
    _this.addClass('current');
    _this.siblings().removeClass('current');
  });

	</script>
</block>